export default class file{
  constructor(){
    this.fsm = wx.getFileSystemManager()
    //todo 临时文件？ save
  }
  makeDir(path){
    this.fsm.mkDirSync(path,true)
  }
  removeDir(path){
    this.fsm.rmDirSync(path,true)
  }
  readDir(path){
    return this.fsm.readdirSync(path)
  }

  
  exist(path){
    this.fsm.acessSync(path)
  }
  append(path, data, encoding) {
    this.fsm.appendFileSyn(path, data, encoding)
  }
  copy(srcPath,destPath){
    this.fsm.copyFileSync(srcPath, destPath)
  }
  read(path,encoding){
    this.fsm.readFileSync(path,encoding)
  }
  rename(scr,dest){
    this.fsm.renameSync(scr,dest)
  }
  write(path, data, encoding) {
    this.fsm.writeFileSyn(path, data, encoding)
  }

}